﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmComprobanteVentaLista.aspx.cs" Inherits="UI.Tesoreria.frmComprobanteVentaLista" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<script language="javascript" type="text/javascript">
    function Button1_onclick() {

    }


    function AbrirVentana(url) {
        window.open(url, '_blank');
    }
    </script>
    <style type="text/css">
        .style1
        {
            width: 749px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<asp:UpdatePanel ID="panelActualizar" runat="server">
    <Triggers>
        <asp:PostBackTrigger ControlID="GridComprobanteVentaLista"/>
    </Triggers>
    <ContentTemplate>
    <asp:Panel ID="Panel1" runat="server">
     <table dir="ltr" frame="box">
                    <tr>
                        <td  class="style4" colspan="7">
                            FILTROS</td>
                    </tr>
                    <tr>
                        <td >
                            <asp:Label ID="Label1" runat="server" Text="Numeración"></asp:Label>
                        </td>
                        <td class="styleCOntrolIngreso">
                            <asp:TextBox ID="txtCodigoFiltro" runat="server" Height="16px" Width="89px"></asp:TextBox>
                        </td>
                        <td class="style33">
                            </td>
                        <td class="styleCOntrolIngreso">
                            <asp:Label ID="Label2" runat="server" Text="Nombre"></asp:Label>
                        </td>
                        <td class="styleCOntrolIngreso">
                            <asp:TextBox ID="txtNombreFiltro" runat="server" Height="18px" Width="234px"></asp:TextBox>
                        </td>
                        <td class="style32">
                            </td>
                        <td class="styleCOntrolIngreso">
                            <asp:Button ID="Button1" runat="server" CssClass="botoncito" Text="Buscar" 
                                onclick="Button1_Click"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Fecha Inicio</td>
                        <td class="styleCOntrolIngreso">
                            
                            <asp:TextBox ID="txtFechaApertura" runat="server" Width="100px"></asp:TextBox>
                <asp:CalendarExtender ID="txtFechaApertura_CalendarExtender" runat="server" 
                    Enabled="True" Format="dd/MM/yyyy" TargetControlID="txtFechaApertura">
                </asp:CalendarExtender>


                            </td>
                        <td class="style33">
                            &nbsp;</td>
                        <td class="styleCOntrolIngreso">
                            Fecha Fin</td>
                        <td class="styleCOntrolIngreso">
                             <asp:TextBox ID="txtFechaCierre" runat="server" Width="100px"></asp:TextBox>
                            <asp:CalendarExtender ID="txtFechaCierre_CalendarExtender" runat="server" Enabled="True"
                                Format="dd/MM/yyyy" TargetControlID="txtFechaCierre">
                            </asp:CalendarExtender></td>
                        <td class="style32">
                            &nbsp;</td>
                        <td class="styleCOntrolIngreso">
                            &nbsp;</td>
                    </tr>
          </table>

        <asp:Label ID="LabelErrorListado" runat="server" Font-Bold="True" 
            ForeColor="Red"></asp:Label>

        <br />
        <table style="width: 868px" >
            <tr>
                <td class="style34" >
                    </td>
                <td class="style1" >
                    <asp:Button ID="btnNuevo" runat="server" Height="32px" 
                        Text="Nuevo" Width="88px" onclick="btnNuevo_Click" />
                </td>
            </tr>
        </table>

        <asp:GridView ID="GridComprobanteVentaLista" runat="server" AllowPaging="True" PageSize="15"
            AutoGenerateColumns="False" Width="886px" DataKeyNames="id" 
            onpageindexchanging="GridComprobanteVentaLista_PageIndexChanging" 
           
            onrowcommand="GridComprobanteVentaLista_RowCommand" 
            onrowdatabound="GridComprobanteVentaLista_RowDataBound">
            <Columns>
                <%--<asp:BoundField DataField="ClienteReferencial" HeaderText="Clte.Ref." />--%>
                <%--<asp:BoundField DataField="Concepto" HeaderText="Concepto" />
                <asp:BoundField DataField="MontoConcepto" HeaderText="M.Concepto" />
                <asp:BoundField DataField="Observacion" HeaderText="Observación" />
                <asp:BoundField DataField="MontoTotal" HeaderText="M.Total" />
                <asp:BoundField DataField="MontoPagado" HeaderText="M.Pagado" />--%>
                <asp:BoundField DataField="id" HeaderText="ID" Visible="False" />
                <asp:BoundField DataField="Documento" HeaderText="Documento" />
                <asp:BoundField DataField="Numeracion" HeaderText="Numeración" />
                <asp:BoundField DataField="CreadoPor" HeaderText="Creado Por" />
                <asp:BoundField DataField="Fecha" HeaderText="Fecha" />
                <asp:BoundField DataField="Cliente" HeaderText="Cliente" />                
                <asp:BoundField DataField="SubTotal" HeaderText="SubTotal" />

                <asp:BoundField DataField="Total" HeaderText="Total" />
                <asp:BoundField DataField="AnuladoPor" HeaderText="Anulado Por" />
                <asp:BoundField DataField="Estado" HeaderText="Estado" />
                                                                                               


                
                 <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton ID="Reporte" Runat="server" 
                    CommandName="Reporte">
                    Reporte
                    </asp:LinkButton>
                </ItemTemplate>
                </asp:TemplateField> 

                <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton ID="Anular" Runat="server" 
                    OnClientClick="return confirm('¿Desea anular el registro?');" 
                        CommandName="Anular">
                    Anular
                    </asp:LinkButton>
                </ItemTemplate>
                </asp:TemplateField> 
                                     


                
            </Columns>
        </asp:GridView>
        <br />
         <br />
    <br />
     <asp:Label ID="LabelResultados" runat="server" ForeColor="Red" Style="font-family: Arial"></asp:Label>     

    </asp:Panel>
    </ContentTemplate>
</asp:UpdatePanel>

<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="panelActualizar" DisplayAfter="0">
    <ProgressTemplate>
        <div style="background-color: Gray; filter:alpha(opacity=60); opacity:0.60; width: 100%; top: 0px; left: 0px; position: fixed; height: 100%;">
        </div>
          <div style="margin:auto;
              font-family:Trebuchet MS;
              filter: alpha(opacity=100);
              opacity: 1;
              font-size:small;
              vertical-align: middle;
              top: 45%;
              position: fixed;
              right: 45%;
              color: #275721;
              text-align: center;
              background-color: White;
              height: 100px; bottom: 296px;">
                <table style=" background-color: White; font-family: Sans-Serif; text-align: center; border: solid 1px #275721; color: #275721; width: inherit; height: inherit; padding: 15px;">
                <tr>
                <td style=" text-align: inherit;"><img src="../Imagenes/Gif/cargando.gif" alt="Loading"  /></td>
                <td style=" text-align: inherit;"><span style="font-family: Sans-Serif; font-size: medium; font-weight: bold; font">Cargando...</span></td>
                </tr>
                </table>
        </div>
    </ProgressTemplate>
    </asp:UpdateProgress>

</asp:Content>
